
import socket

server = socket.socket()

server.bind(('127.0.0.1',8001))

server.listen()

conn,addr = server.accept()

while 1:
    try:
        from_client_msg = conn.recv(1024).decode('utf-8')
        print('来自客户端的消息>>>', from_client_msg)
        message = input('>>>>').encode('utf-8')
        conn.send(message)
    except Exception:

        break



















